package com.ry.novel.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ry.novel.model.dto.AuthorInfo;
import com.ry.novel.model.dto.BookInfo;
import com.ry.novel.model.dto.condition.CommonQuery;

import java.util.List;

/**
 * @author ry
 * @since 2022-01-25 14:42
 **/
public interface AuthorService {
    /**
     * 判断这个用户是否已经是作者
     * @param userId
     * @return
     */
    AuthorInfo isAuthor(Long userId);

    /**
     * 成为作家
     * @param authorInfo
     */
    void toBeAuthor(AuthorInfo authorInfo);

    Page<BookInfo> authorHome(CommonQuery commonQuery);
}
